diff options
| author | Joe Carstairs <me@joeac.net> | 2026-04-13 08:37:56 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-04-13 08:37:56 +0100 |
| commit | 1a64bce2fbf4f8c430672b63c62c6b99c0ac496a (patch) | |
| tree | 57b53229fea8ac330fe928d2fae6e1ce69a20df6 /website/src/pages/blog/[...slug].astro | |
| parent | cf6dbc2aa132920b09bfb3693ac4fe11092bc2d6 (diff) | |
website can get pubDate from filename instead of frontmatter
Diffstat (limited to 'website/src/pages/blog/[...slug].astro')
| -rw-r--r-- | website/src/pages/blog/[...slug].astro | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/website/src/pages/blog/[...slug].astro b/website/src/pages/blog/[...slug].astro index a4168b6..28d5ec0 100644 --- a/website/src/pages/blog/[...slug].astro +++ b/website/src/pages/blog/[...slug].astro @@ -53,6 +53,11 @@ const Content = post.filePath?.endsWith('.gmi') : (await render(post)).Content; --- -<BlogPost {...post.data}> +<BlogPost + title={post.data.title} + description={post.data.description} + pubDate={post.data.pubDate ?? new Date(post.id)} + updatedDate={post.data.updatedDate} +> { post.filePath?.endsWith('.gmi') ? <Fragment set:html={Content}></Fragment> : <Content />} </BlogPost> |
